home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 06 - 1990 / 06.02 Feb 90 / Bit Mapper Source / BTMP2 / BitMapper.r < prev    next >
Encoding:
Text File  |  1989-11-18  |  4.9 KB  |  194 lines  |  [TEXT/MPS ]

  1. /* ======================================= *
  2.     file:    BitMapper.r
  3.     date:    11.13.89
  4.  * --------------------------------------- *
  5.     Resources for the BitMapper SuperPaint
  6.     plug-in menu command.
  7.  * --------------------------------------- *
  8.     Copyright © 1989, Michael Ogawa and
  9.     MacTutor — All Rights Reserved.
  10.  * ======================================= */
  11.  
  12. #include "BitMapperRsrc.h"
  13.  
  14.  
  15. data 'PiMI' (kOrigBaseID, purgeable)
  16. /*    Plug-in Module Information specifying
  17. version 1 interface. */
  18. /*    m_o 09.13.89 */
  19. {
  20.     $"00 01"
  21. };
  22.  
  23.  
  24. resource 'MENU' (16000, purgeable)
  25. /*    Hierarchical sub-menu. */
  26. /*    m_o 11.17.89 */
  27. {
  28.     kMENU_BitMapper,
  29.     textMenuProc,
  30.     allEnabled,
  31.     enabled,
  32.     "BitMapper",
  33.     {    /* array: 2 elements */
  34.         /* [1] kMITEM_BTMP */
  35.         "BTMP", noIcon, noKey, noMark,
  36.             plain,
  37.          /* [2] kMITEM_BTMN */
  38.         "BTM#", noIcon, noKey, noMark,
  39.             plain
  40.     }
  41. };
  42.  
  43.  
  44. resource 'ALRT' (kOrigBaseID + kALRT_Err,
  45.     "errAlrt", purgeable)
  46. /*    Alert template for the error alert.  The
  47. window height and width are based on the
  48. actual items in the dialogs.  The top
  49. coordinate is arbitrary.  The left coordinate
  50. is calculated by: (512 - width) / 2.  The
  51. actual desktop position should be calculated
  52. at runtime depending on the actual desktop
  53. size/configuration. */
  54. /*    m_o 09.30.89 */
  55. {        /*148*/
  56.     {40, 0, 40+92+8, 0+208+8},
  57.     kOrigBaseID + kDITL_Err,
  58.     {    /* array: 4 elements */
  59.         OK, visible, sound1,    /* [1] */
  60.         OK, visible, sound1,    /* [2] */
  61.         OK, visible, sound1,    /* [3] */
  62.         OK, visible, sound1        /* [4] */
  63.     }
  64. };
  65.  
  66. resource 'DITL' (kOrigBaseID + kDITL_Err,
  67.     "errAlrt", purgeable)
  68. /*    Dialog item list for the error alert.
  69. The param text ^0 in the prompt text should
  70. be filled in with the error code or some
  71. other message at runtime. */
  72. /*    m_o 09.30.89 */
  73. {
  74.     {    /* array DITLarray: 2 elements */
  75.         /* [1] */
  76.         {72, 8, 92, 78}, Button
  77.             {enabled, "Darn!" },
  78.         /* [2] */
  79.         {8, 64, 56, 208}, StaticText
  80.             {disabled,
  81.             "Oops!  Something went "
  82.             "wrong.  Sorry about that.  "
  83.             "(^0)"
  84.         }
  85.     }
  86. };
  87.  
  88. resource 'actb' (kOrigBaseID + kactb_Err,
  89.     "errAlrt", purgeable)
  90. /*    This is a default color table for the
  91. error alert */
  92. /*    m_o 09.30.89 */
  93. {
  94.     0x0,
  95.     0,
  96.     {}    /* array ColorSpec: 0 elements */
  97. };
  98.  
  99.  
  100. data 'TEXT' (kOrigBaseID, "about", purgeable)
  101. /*    Provides information about BitMapper to
  102. the user from within SuperPaint’s About Box.
  103.     Utilizes the constants kCopyright,
  104. kVersionStr, and kAnnotate. */
  105. /*    m_o 09.30.89 */
  106. {
  107.     "  BitMapper takes ‘snapshots’ of your "
  108.     "active SuperPaint document window and "
  109.     "turns them into 'BTMP' or 'BTM#' "
  110.     "resources which it places on the "
  111.     "clipboard.  It also places a 'PICT' "
  112.     "copy of the selection on the "
  113.     "clipboard so that you can see what "
  114.     "the 'BTMP' or 'BTM#' looks like.\n"
  115.     "  The 'BTMP' resource type consists "
  116.     "of a BitMap data structure followed "
  117.     "by a bit image.  "
  118.     "The baseAddr field of the saved "
  119.     "resource is set to Nil.  "
  120.     "The bounds field is set to a "
  121.     "rectangle the size of the selection "
  122.     "rectangle with its top left corner "
  123.     "set to (0,0).  "
  124.     "RowBytes is the actual width of the "
  125.     "selection (in bytes), rounded up "
  126.     "to an even width if necessary.  "
  127.     "The actual bit image then follows.\n"
  128.     "  The 'BTM#' resource type consists "
  129.     "of a list of 'BTMP' resources.  "
  130.     "It begins with an INTEGER count field "
  131.     "indicating how many 'BTMP' entries "
  132.     "are in the resource.  "
  133.     "Then, each entry consists of an "
  134.     "INTEGER szEntry field and a 'BTMP'.  "
  135.     "The szEntry field gives the size, in "
  136.     "bytes, of the entry.  " 
  137.     "That is, the size of the 'BTMP' "
  138.     "resource for the entry plus two (the "
  139.     "size of the INTEGER szEntry field).  "
  140.     "This makes it easy to quickly walk "
  141.     "through the 'BTM#' to get to the "
  142.     "indexed 'BTMP' entry that you are "
  143.     "interested in.\n"
  144.     "  For details on using 'BTMP' and "
  145.     "'BTM#' resources, see Mike Scanlin’s "
  146.     "article in MacTutor magazine.\n"
  147.     "  Please send comments to: Michael "
  148.     "Ogawa, 619-224-3058, 619-721-7000 "
  149.     "(Palomar Software), or AppleLink "
  150.     "“M.O”.\n\n"
  151.     "BitMapper by…\n"
  152.     "  Michael Ogawa\n"
  153.     "Special thanks to…\n"
  154.     "  Dana Gregory\n"
  155.     "  Linda McClennan\n"
  156.     "  Mike Scanlin\n\n"
  157.     "Copyright © 1989 Michael Ogawa — All "
  158.     "Rights Reserved.\n"
  159.     "May not be redistributed for "
  160.     "commercial purposes.  May be freely "
  161.     "distributed on electronic bulletin "
  162.     "boards provided no additional charges "
  163.     "above the board’s standard connect "
  164.     "charges are imposed.  May be freely "
  165.     "distributed by non-profit "
  166.     "organizations on disk provided that "
  167.     "any charges for the distribution disk "
  168.     "does not exceed actual disk, "
  169.     "labelling materials, reproduction, "
  170.     "and shipping charges incurred by the "
  171.     "organization.\n"
  172.     "This software is provided “as is”, "
  173.     "with no warranties, either express or "
  174.     "implied, being made regarding its "
  175.     "fitness for any particular purpose.\n"
  176.     "v2.00"
  177. };
  178.  
  179.  
  180. resource 'vers' (1, purgeable)
  181. /*    Finder “get info” resource providing
  182. version information about our plug-in menu
  183. command to the user. */
  184. /*    m_o 11.13.89 */
  185. {
  186.     0x02,
  187.     0x00,
  188.     release,
  189.     0x00,
  190.     verUs,
  191.     "2.00",
  192.     "2.00 (US), © 1989 Michael Ogawa"
  193. };
  194.